#!/user/bin/env python
# -*- coding: utf-8 -*-
''' 
Author: Sjy
LastEditTime: 2024-12-10 09:55:27
Description: qt 内置图标获取
'''

__all__= []

from PyQt5 import QtCore, QtGui, QtWidgets

def get_style() -> QtWidgets.QStyle:
    """获取当前应用的风格
    Returns:
        QtWidgets.QStyle: 返回应用风格
    """
    return QtWidgets.QApplication.instance().style()

def qicon_down() -> QtGui.QIcon:
    """获取向下箭头图标
    Returns:
        QtGui.QIcon: 返回向下箭头图标
    """
    return get_style().standardIcon(QtWidgets.QStyle.SP_TitleBarUnshadeButton)
def qicon_up() -> QtGui.QIcon:
    """获取向上箭头图标
    Returns:
        QtGui.QIcon: 返回向上箭头图标
    """
    return get_style().standardIcon(QtWidgets.QStyle.SP_TitleBarShadeButton)